package com.kczd.jinlan.view.shouye.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

import com.kczd.jinlan.R;
import com.kczd.jinlan.adapter.normaladapter.ShopdetailsAdapter;

/**
 * 商品详情页面
 * zhangy
 * Created by Administrator on 2017/5/19.
 */

public class XiangqingFragement extends Fragment {

    private View view;
    private ShopdetailsAdapter shopdetailsAdapter;
    private ListView product_presentation;//产品介绍
    private ListView product_show;//产品展示
    private ListView choice_criterion;//选择标准
    private ListView package_show;//包装展示

    int[] imgs = { R.mipmap.shouye_lunbo, R.mipmap.shouye_lunbo, R.mipmap.shouye_lunbo, R.mipmap.shouye_lunbo, R.mipmap.shouye_lunbo,
            R.mipmap.shouye_lunbo };

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        view =inflater.inflate(R.layout.xiangqing_fragment,null);
        initListView();//初始化listView
        return view;
    }

    private void initListView() {
        product_presentation= (ListView) view.findViewById(R.id.id_product_presentation);
        product_show= (ListView) view.findViewById(R.id.id_product_show);
        choice_criterion= (ListView) view.findViewById(R.id.id_choice_criterion);
        package_show= (ListView) view.findViewById(R.id.id_package_show);

        shopdetailsAdapter=new ShopdetailsAdapter(imgs);
        product_presentation.setAdapter(shopdetailsAdapter);
        product_show.setAdapter(shopdetailsAdapter);
        choice_criterion.setAdapter(shopdetailsAdapter);
        package_show.setAdapter(shopdetailsAdapter);
    }
}
